package com.lei.lib_croe.http;

import com.lei.lib_croe.http.bean.ObjDataBean;
import com.lei.lib_croe.http.bean.TokenBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/10 16:12
 * @Description : 文件描述
 */
public interface Api {
    //b519c1671bf11916a14715811911e1421f71661701ce1ba1
    @FormUrlEncoded
    @POST("token")
    Call<TokenBean> token(@Field("grant_type") String type,@Field("username") String code,@Field("password")String password);

    @POST("api/User/register")
    Observable<ObjDataBean<String>> register(@Body RequestBody requestBody);
}
